﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace SuppKids.Core.Domain
{
	public class Product : Entity
	{
		private ICollection<Ingredient> ingredients = new List<Ingredient>();
        private ICollection<Norm> norms = new List<Norm>();
		private ICollection<ProductAtStorage> productsAtStorage = new List<ProductAtStorage>();


		[Required]
		[StringLength(255)]
		public virtual string Name { get; set; }

		[StringLength(255)]
		public string Cipher { get; set; }

		[Required]
		public int Price { get; set; }

		[Required]
		public double DailyRate { get; set; }
        
        public virtual ICollection<Norm> Norms
        {
            get { return norms; }
            set { norms = value; }
        }
        
		public virtual ICollection<Ingredient> Ingredients
		{
			get { return ingredients; }
			set { ingredients = value; }
		}

		public virtual ICollection<ProductAtStorage> ProductsAtStorage
		{
			get { return productsAtStorage; }
			set { productsAtStorage = value; }
		}
	}
}